package com.muyu.system.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.muyu.common.core.annotation.Excel;
import com.muyu.common.core.web.domain.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import com.muyu.danmo.domain.DanmoAddresses;
import lombok.experimental.SuperBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.math.BigDecimal;
import java.util.Date;


/**
 * 订单详情对象 danmo_shopping_order_details
 *
 * @author yangle
 * @date 2024-09-29
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@SuperBuilder
public class DanmoShoppingOrderDetails extends BaseEntity {
    private static final long serialVersionUID = 1L;


    /** 订单ID */
    private Long id;

    /** 用户ID */
    @Excel(name = "用户ID")
    private Long userId;

    /**
     * 商品数量
     */
    @Excel(name = "商品数量")
    private Long quantity;

    /** 订单状态(1 待付款、2 待发货、3 已发货、4 已完成、5 已取消) */
    @Excel(name = "订单状态(1 待付款、2 待发货、3 已发货、4 已完成、5 已取消)")
    private Long orderStatus;

    /**
     * 快递
     */
    @Excel(name = "快递")
    private String posExpress;

    /**
     * 快递单号
     */
    @Excel(name = "快递单号")
    private String expressDeliveryNumber;

    /**
     * 商品ID
     */
    @Excel(name = "商品ID")
    private Long productId;

    /**
     * 商品规格
     */
    @Excel(name = "商品规格ID")
    private Long productSpecifications;

    /** 下单时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date orderTime;

    /**
     * 发货时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date deliveryTime;

    /**
     * 付款时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date paymentTime;

    /**
     * 成交时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date transactionTime;

    /**
     * 上架时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date shelfTime;

    /** 订单总金额 */
    @Excel(name = "订单总金额")
    private BigDecimal totalAmount;

    /**
     * 订单地址
     */
    @Excel(name = "订单地址")
    private Long addressesId;

    /**
     * 支付方式
     */
    @Excel(name = "支付方硕")
    private Long paymentMethod;

    /**
     * 单价
     */
    @Excel(name = "单价")
    private BigDecimal unitPrice;


    /**
     * 商品信息
     */
    private DanmoShoppingProducts danmoShoppingProducts;

    /**
     * 订单地址
     */
    private DanmoAddresses danmoAddresses;

    /**
     * 是否来自购物车
     */
    private Boolean isShoppingCart;

    /**
     * 邮费
     */
    private BigDecimal totalPostage;




    private Integer pageNum = 1;
    private Integer pageSize = 10;

//    public void setId(Long id)
//    {
//        this.id = id;
//    }
//
//    public Long getId()
//    {
//        return id;
//    }
//    public void setOrderId(Long orderId)
//    {
//        this.orderId = orderId;
//    }
//
//    public Long getOrderId()
//    {
//        return orderId;
//    }
//    public void setProductId(Long productId)
//    {
//        this.productId = productId;
//    }
//
//    public Long getProductId()
//    {
//        return productId;
//    }
//    public void setQuantity(Long quantity)
//    {
//        this.quantity = quantity;
//    }
//
//    public Long getQuantity()
//    {
//        return quantity;
//    }
//    public void setPrice(BigDecimal price)
//    {
//        this.price = price;
//    }
//
//    public BigDecimal getPrice()
//    {
//        return price;
//    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", id)
                .append("userId", userId)
                .append("quantity", quantity)
                .append("orderStatus", orderStatus)
                .append("productId", productId)
                .append("productSpecifications", productSpecifications)
                .append("orderTime", orderTime)
                .append("deliveryTime", deliveryTime)
                .append("paymentTime", paymentTime)
                .append("transactionTime", transactionTime)
                .append("shelfTime", shelfTime)
                .append("totalAmount", totalAmount)
                .append("addressesId", addressesId)
                .append("paymentMethod", paymentMethod)
                .append("posExpress", posExpress)
                .append("expressDeliveryNumber", expressDeliveryNumber)
                .append("unitPrice", unitPrice)
                .append("danmoShoppingProducts", danmoShoppingProducts)
                .append("danmoAddresses", danmoAddresses)
                .append("isShoppingCart", isShoppingCart)
                .append("totalPostage", totalPostage)
                .toString();
    }
}
